repeat 
  current = sonarReading(4)
  if current < 25 then
     stop(A)
     backward(B)
  elseif current < 50 then
     forward(A, current + 50)
     forward(B, current + 50)
  else
     forward(A)
     forward(B)
  end
until isPressed(ESCAPE)
stop(A)
stop(B)


